{% extends 'Web/layout_main.html.twig' %}

{% block myCss %}
{% endblock %}

{% block adBanner %}
    {#banner_ad_2#}
    {% if adBannerArray.list is defined %}
        <div class="mart20 marb20 bdso">
            <a href="{{ adBannerArray.list.url }}"><img class="w100" src="{{ adBannerArray.list.pic }}" alt="banner_ad_1"></a>
        </div>
    {% endif %}
{% endblock %}

{% block main %}

    <form action="" method="post">
    {#{{ dump(data) }}#}
    {#{{ dump(page) }}#}
    <div class="bc13 lh2 mart20">
        <ul class="breadcrumb">
            <li><a href="javascript:history.go(-1);" class="c12"><span class="fa fa-angle-left"></span> 返回</a></li>
            <li><a href="/">首页</a></li>
            <li><a href="{{ path("articleCatList",{id:data.parentCat.id}) }}">{{ data.parentCat.name }}</a></li>
            <li class="active">{{ data.curCat }}</li>
            {#<span class="pull-right"><a href="javascript:history.go(-1);" class="c12"><span class="fa fa-angle-left"></span> 返回</a></span>#}
        </ul>
    </div>

    {#资讯栏目 start#}
    <div class="row">
        <div class="">
            <div class="col-md-8 col-sm-12 col-xs-12">
                <div class="col-md-3 col-sm-4 col-xs-6 bc1 c13 pad5 lh2 fs18">
                    <span class="fa fa-list-ul padl5"></span>
                    {{ data.parentCat.name }}
                </div>
            </div>
            <div class="col-md-4 col-sm-12 col-xs-12">

            </div>
        </div>
        <div class="padb5 col-md-12">
            <div class="col-md-12  bdbso bdc1 bdw3 padb5"></div>
        </div>
        <div>
            <div class="col-md-8 col-sm-12 col-xs-12  c12">
                {% if data.sonCat != [] %}
                <div class="mart5 bc13 col-md-12 pad5">

                    {% for item in data.sonCat %}
                        <div class="col-md-2 col-sm-3 col-xs-4 pad5 tac">
                            <a class="pad5 {{ data.curId == item.id ? 'bc1 c13 round2':' c12' }}" href="{{ path("articleCatList",{id:item.id}) }}">{{ item.name }}</a>
                        </div>
                    {% endfor %}


                </div>
                {% endif %}
                <div class="lh2 col-md-12">
                    {% if data.curId in ids_pic %}
                        {% for item in data.list %}
                            <a href="/file/info?id={{ item.id }}">
                                <div class="col-md-6 col-sm-12 col-xs-12 pos-r">
                                    <div class="w100 pad10">
                                        <img class="w100" style="height: 240px;" src="{{ item.pic }}" alt="">
                                    </div>
                                    <div class="fs14 c1 fwb pos-a l0 b0 r0 pad5 marb10">{{ item.title }}</div>
                                </div>
                            </a>
                        {% endfor %}
                    {% else %}
                        {% for item in data.list %}
                            <a class="c11" href="/file/info?id={{ item.id }}">
                                <div class="flrc padt5 padb5 bdbdo op8">
                                    {#<div class="padr5"><span class="fa fa-h-square red op{{ 10-item>=0?10-item:'' }}"></span></div>#}
                                    <div class="fa fa-caret-right fs6 c12 pad5"></div>
                                    <div class="padl5 padr10 fwb">[ {{ item.name }} ]</div>
                                    <div class="ofe flex1 fwb">{{ item.title }}</div>
                                    <div class="">{{ item.addtime|date("Y-m-d") }}</div>
                                </div>
                            </a>
                        {% endfor %}
                    {% endif %}

                </div>
                <div class="lh2  col-md-12">
                    <div class="col-md-9">{{ page.page|raw }}</div>
                    <div class="col-md-3 c12 padr10 flex1 tar"> 共 {{ page.total }} 条 / 每页 {{ page.perPage }} </div>
                </div>
            </div>
            <div class="col-md-4 col-sm-12 col-xs-12">
                <div class="input-group mart5">
                    <input name="keywords" value="{{ keywords }}" type="text" class="form-control" placeholder="请输入关键">
                    <span class="input-group-btn">
                        <button class="btn btn-default search" type="submit">
                            <span class="fa fa-search"></span>
                        </button>
                    </span>
                </div><!-- /input-group -->
                <div class="padb2 mart10">
                    <div class="bc1 c13 flrc pad5 flrc fs18 ">
                        <div class="flex1 padl10">相关推荐</div>
                        {#<div class="fs12">#}
                            {#<span class="padr5">查看更多</span>#}
                            {#<span class="fa fa-angle-double-right"></span>#}
                        {#</div>#}
                    </div>
                    <div class="pad10 bdso">
                        {#{% for item in 1..5 %}#}
                            {#<div class="pad5 bdbdo ofe">#}
                                {#2019年云南公务员考试文山州检查系统资格复审及后续相关事项通告#}
                            {#</div>#}
                        {#{% endfor %}#}
                        {{  render(path("ArtListRelate",{category:data.curId,page:0,limit:5,province:province,tpl:'list_side'})) }}
                    </div>
                </div>
                <div class="mart20">
                    <div class="bc1 c13 flrc pad5 flrc fs18 ">
                        <div class="flex1 padl10">点击排行</div>
                        {#<div class="fs12">#}
                            {#<span class="padr5">查看更多</span>#}
                            {#<span class="fa fa-angle-double-right"></span>#}
                        {#</div>#}
                    </div>
                    <div class="pad10 bdso ">
                        {{  render(path("ArtListRelate",{category:data.curId,page:0,limit:5,province:province,tpl:'list_side_hot'})) }}
                        {#{% for index,item in 1..5 %}#}
                            {#<div class="pad5 bdbdo ofe flrc">#}
                                {#{% if index <3 %}#}
                                    {#<div class="jb01 round flcc c13 fwb op{{ 10 - index*3 }} marr5"#}
                                         {#style="width: 21px;height: 21px;">0{{ index + 1 }}</div>#}
                                {#{% endif %}#}
                                {#<div class="flex1 ofe">2019年云南公务员考试文山州检查系统资格复审及后续相关事项通告</div>#}
                            {#</div>#}
                        {#{% endfor %}#}
                    </div>
                </div>
                <div class="mart20">
                    <div class="bc1 c13 flrc pad5 flrc fs18 ">
                        <div class="flex1 padl10">线上报名</div>
                    </div>
                    <div class="pad10 bdso ">
                        {{  render(path("ActivityForm",{tpl:'side_form'})) }}
                    </div>
                </div>
                <div class="mart20">
                    <div class="bc1 c13 flrc pad5 flrc fs18 ">
                        <div class="flex1 padl10">最新问题</div>
                    </div>
                    <div class="pad10 bdso ">
                        {{  render(path("Questions",{isTop:0,page:0,limit:5,tpl:'list_side_question'})) }}
                    </div>
                </div>
            </div>
        </div>

    </div>
    {#资讯栏目 end#}


    </form>
{% endblock %}

{% block myJs %}
    <script>
        $(function () {

            $(".search").click(function () {

                var key = $(this).parents(".input-group").find("form").val()


            });

        });
    </script>
{% endblock %}